import request from "@/request/request";
export function getProducts(categoryId,pageNum,pageSize){
    return request({
        url:'/product/list-by-categoryid/'+categoryId,
        method:'get',
        params:{
            pageNum:pageNum,
            pageSize:pageSize
        }
    })
}
export function getProductsByKeyword(keyword,pageNum,pageSize){
    return request({
        url:'/product/list-by-keyword',
        method:'get',
        params:{
            pageNum:pageNum,
            pageSize:pageSize,
            keyword:keyword
        }
    })
}

export function getProductBrands(categoryId){
    return request({
        url:'/product-params/list-brands/'+categoryId,
        method:'get'
    })
}
export function getProductBrandsByKeyword(keyword){
    return request({
        url:'/product-params/list-brands-keyword/'+keyword,
        method:'get'
    })
}